<html>
<head><meta charset="utf-8"><title>Wrongly placed diagnostics ? · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Wrongly.20placed.20diagnostics.20.3F.html">Wrongly placed diagnostics ?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="223195727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Wrongly%20placed%20diagnostics%20%3F/near/223195727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thomas Vigouroux <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Wrongly.20placed.20diagnostics.20.3F.html#223195727">(Jan 19 2021 at 07:55)</a>:</h4>
<p>Hello there, I am pretty sure this is not the correct way to ask question / report problems, but I wanted to informally ask something.</p>
<p>I am coming here from a bug I face using ra + neovim (and the built-in client  we are working on): <a href="https://github.com/neovim/neovim/issues/13476#issuecomment-762664563">the issue</a>.</p>
<p>I am not sure this is spec compliant, and anyway, do you think we should fix the issue on our end, or that r-a can avoid sending diagnistics past the end of the text file ?</p>
<p>Thanks in advance, and thanks for this awesome tool, every single update is just a massive step forward, you guys are the best, keep up the great work !</p>



<a name="223199699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Wrongly%20placed%20diagnostics%20%3F/near/223199699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Wrongly.20placed.20diagnostics.20.3F.html#223199699">(Jan 19 2021 at 08:48)</a>:</h4>
<p>That's a bug with macros it seem (cc <span class="user-mention" data-user-id="216201">@Edwin Cheng</span> ). We should fix it and add a relevant assert...</p>



<a name="223199793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Wrongly%20placed%20diagnostics%20%3F/near/223199793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Wrongly.20placed.20diagnostics.20.3F.html#223199793">(Jan 19 2021 at 08:49)</a>:</h4>
<p>scratch that, ther's unclosed quote...</p>



<a name="223199931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Wrongly%20placed%20diagnostics%20%3F/near/223199931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Wrongly.20placed.20diagnostics.20.3F.html#223199931">(Jan 19 2021 at 08:51)</a>:</h4>
<p>Ok, apparently it is neovim issue? <a href="https://github.com/neovim/neovim/issues/13476#issuecomment-762674734">https://github.com/neovim/neovim/issues/13476#issuecomment-762674734</a></p>



<a name="223201489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Wrongly%20placed%20diagnostics%20%3F/near/223201489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Wrongly.20placed.20diagnostics.20.3F.html#223201489">(Jan 19 2021 at 09:09)</a>:</h4>
<p>There's an unclosed quote and diagnostics at the end of the file aren't so unusual, but the range is a bit weird</p>



<a name="223201555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Wrongly%20placed%20diagnostics%20%3F/near/223201555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Wrongly.20placed.20diagnostics.20.3F.html#223201555">(Jan 19 2021 at 09:10)</a>:</h4>
<p>Lines 21-24 (0-based I suppose)</p>



<a name="223207076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Wrongly%20placed%20diagnostics%20%3F/near/223207076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thomas Vigouroux <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Wrongly.20placed.20diagnostics.20.3F.html#223207076">(Jan 19 2021 at 10:10)</a>:</h4>
<p>Oh sorry for the noise then, as is seems to come from our side !</p>



<a name="223207441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Wrongly%20placed%20diagnostics%20%3F/near/223207441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Wrongly.20placed.20diagnostics.20.3F.html#223207441">(Jan 19 2021 at 10:14)</a>:</h4>
<p>No worries, I am personally very interested in rust-analyzer support in neovim, feel free to reach out at any time!</p>



<a name="223209853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Wrongly%20placed%20diagnostics%20%3F/near/223209853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Edwin Cheng <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Wrongly.20placed.20diagnostics.20.3F.html#223209853">(Jan 19 2021 at 10:40)</a>:</h4>
<p>if there is any syntax error,  mbe should not be able to expand (because of <code>token_tree_to_syntax_node</code> will fail), but I have not tested it</p>



<a name="223210053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Wrongly%20placed%20diagnostics%20%3F/near/223210053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Edwin Cheng <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Wrongly.20placed.20diagnostics.20.3F.html#223210053">(Jan 19 2021 at 10:42)</a>:</h4>
<p>And I am neovim happy user too  ^^</p>



<a name="223212302"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Wrongly%20placed%20diagnostics%20%3F/near/223212302" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Wrongly.20placed.20diagnostics.20.3F.html#223212302">(Jan 19 2021 at 11:07)</a>:</h4>
<p>wow, I didn't realize that! <span class="user-mention" data-user-id="216201">@Edwin Cheng</span> are you on neovim 0.5 with built-in lsp?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>